package cn.sanshuilin.kst.system.provider.bean;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2018-02-26 16:45
 * Copyright 2018  by 三水林科技有限公司
 **/
@Entity
@Table(name = "subject")
public class SubjectBean {
    private String id;
    private String pubMemberId;
    private Timestamp pubDate;
    private Integer isTopId;
    private String title;
    private Integer readStatus;
    private Integer fanCount;
    private Integer readCount;
    private Integer shareCount;
    private Integer attentionCount;
    private Integer attitudeCount;
    private String imageAttachmentIDs;
    private String description;

    @Id
    @Column(name = "ID", nullable = false, length = 255)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "PubMemberID", nullable = false, length = 255)
    public String getPubMemberId() {
        return pubMemberId;
    }

    public void setPubMemberId(String pubMemberId) {
        this.pubMemberId = pubMemberId;
    }

    @Basic
    @Column(name = "PubDate", nullable = true)
    public Timestamp getPubDate() {
        return pubDate;
    }

    public void setPubDate(Timestamp pubDate) {
        this.pubDate = pubDate;
    }

    @Basic
    @Column(name = "IsTopID", nullable = true)
    public Integer getIsTopId() {
        return isTopId;
    }

    public void setIsTopId(Integer isTopId) {
        this.isTopId = isTopId;
    }

    @Basic
    @Column(name = "Title", nullable = true, length = 500)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "ReadStatus", nullable = true)
    public Integer getReadStatus() {
        return readStatus;
    }

    public void setReadStatus(Integer readStatus) {
        this.readStatus = readStatus;
    }

    @Basic
    @Column(name = "FanCount", nullable = true)
    public Integer getFanCount() {
        return fanCount;
    }

    public void setFanCount(Integer fanCount) {
        this.fanCount = fanCount;
    }

    @Basic
    @Column(name = "ReadCount", nullable = true)
    public Integer getReadCount() {
        return readCount;
    }

    public void setReadCount(Integer readCount) {
        this.readCount = readCount;
    }

    @Basic
    @Column(name = "ShareCount", nullable = true)
    public Integer getShareCount() {
        return shareCount;
    }

    public void setShareCount(Integer shareCount) {
        this.shareCount = shareCount;
    }

    @Basic
    @Column(name = "AttentionCount", nullable = true)
    public Integer getAttentionCount() {
        return attentionCount;
    }

    public void setAttentionCount(Integer attentionCount) {
        this.attentionCount = attentionCount;
    }

    @Basic
    @Column(name = "AttitudeCount", nullable = true)
    public Integer getAttitudeCount() {
        return attitudeCount;
    }

    public void setAttitudeCount(Integer attitudeCount) {
        this.attitudeCount = attitudeCount;
    }

    @Basic
    @Column(name = "ImageAttachmentIDs", nullable = true, length = 255)
    public String getImageAttachmentIDs() {
        return imageAttachmentIDs;
    }

    public void setImageAttachmentIDs(String imageAttachmentIDs) {
        this.imageAttachmentIDs = imageAttachmentIDs;
    }

    @Basic
    @Column(name = "Description", nullable = true, length = 255)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SubjectBean that = (SubjectBean) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (pubMemberId != null ? !pubMemberId.equals(that.pubMemberId) : that.pubMemberId != null) return false;
        if (pubDate != null ? !pubDate.equals(that.pubDate) : that.pubDate != null) return false;
        if (isTopId != null ? !isTopId.equals(that.isTopId) : that.isTopId != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (readStatus != null ? !readStatus.equals(that.readStatus) : that.readStatus != null) return false;
        if (fanCount != null ? !fanCount.equals(that.fanCount) : that.fanCount != null) return false;
        if (readCount != null ? !readCount.equals(that.readCount) : that.readCount != null) return false;
        if (shareCount != null ? !shareCount.equals(that.shareCount) : that.shareCount != null) return false;
        if (attentionCount != null ? !attentionCount.equals(that.attentionCount) : that.attentionCount != null)
            return false;
        if (attitudeCount != null ? !attitudeCount.equals(that.attitudeCount) : that.attitudeCount != null)
            return false;
        if (imageAttachmentIDs != null ? !imageAttachmentIDs.equals(that.imageAttachmentIDs) : that.imageAttachmentIDs != null)
            return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (pubMemberId != null ? pubMemberId.hashCode() : 0);
        result = 31 * result + (pubDate != null ? pubDate.hashCode() : 0);
        result = 31 * result + (isTopId != null ? isTopId.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (readStatus != null ? readStatus.hashCode() : 0);
        result = 31 * result + (fanCount != null ? fanCount.hashCode() : 0);
        result = 31 * result + (readCount != null ? readCount.hashCode() : 0);
        result = 31 * result + (shareCount != null ? shareCount.hashCode() : 0);
        result = 31 * result + (attentionCount != null ? attentionCount.hashCode() : 0);
        result = 31 * result + (attitudeCount != null ? attitudeCount.hashCode() : 0);
        result = 31 * result + (imageAttachmentIDs != null ? imageAttachmentIDs.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        return result;
    }
}
